package com.uni.dao;

import com.uni.entity.CommodityRecord;
import com.uni.entity.CommodityType;
import com.uni.entity.User;

import java.util.List;

/**
 * --------------project-------------
 *
 * @Author Unirithe  - Mr.Chao
 * - CSDN:
 * https://blog.csdn.net/Unirithe
 * - GitHub:
 * https://github.com/unirithe
 * @create 2021/12/18 12:18
 * ------------------------------------------
 */
public interface UserDao {
    User queryUserById(int id);
    User queryUserByName(String name);
    User queryByPhone(String phone);   //      根据号码查询用户
    boolean insertUser(User user);        //      插入用户
    User checkUser(String name, String password);    // 判断是否存在用户
    boolean updateUSer(User user);     // 修改用户信息
    List<User> queryAllUser();          // 查询所有用户
    List<CommodityRecord> queryHistory(User user); // 查询浏览记录
    boolean deleteUserById(int id);     // 删除用户
    boolean deleteHistoryById(int id);       // 删除用户浏览记录

}
